For example, an optical encoder described in Patent Document 1 is known as a conventional optical encoder. The conventional encoder has an optical scale in which lattice windows having different diffracting patterns are annularly arranged, and diffracted patterns of light to be detected to the lattice windows through a slit are picked up by an image sensor. Then, the lattice windows are specified from the picked-up diffracted patterns, and also the positions of the lattice windows are specified on the basis of the positions of the diffracted patterns in the image, whereby the absolute angle of a measurement target is detected.
Patent Document 1: Japanese Published Examined Patent Application No. H08-10145